<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'shop-subcategories-form',
	'enableAjaxValidation'=>false,
)); ?>

	<p class="note">Fields with <span class="required">*</span> are required.</p>

	<?php echo $form->errorSummary($model); ?>

	<div class="row">
		<?php echo $form->labelEx($model,'category_name'); ?>
		<?php echo $form->textField($model,'category_name',array('size'=>60,'maxlength'=>60)); ?>
		<?php echo $form->error($model,'category_name'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'status'); ?>
		<?php
			if($flag =='create'){
				unset($cnstatus[array_search('打开' , $cnstatus)]) ;
				echo $form->dropDownList($model , 'status' , $cnstatus ,array('prompt'=>'打开') ) ;
			}
			else if($flag =='update'){
				$ns_str = $cnstatus[$model->status] ;
				unset($cnstatus[array_search($ns_str, $cnstatus)]) ;
				echo $form->dropDownList($model , 'status' , $cnstatus ,array('prompt'=> $ns_str) ) ;
			}
		?>
		<?php echo $form->error($model,'status'); ?>
	</div>

	<div class="row buttons">
		<?php echo CHtml::submitButton($model->isNewRecord ? 'Create' : 'Save'); ?>
	</div>

<?php $this->endWidget(); ?>

</div><!-- form -->